//
//  HCBaseTableViewController.swift
//  新浪微博
//
//  Created by fanhoucheng on 16/9/23.
//  Copyright © 2016年 fanhoucheng. All rights reserved.
//

import UIKit

class HCBaseTableViewController: UITableViewController, HCVisitorDelegate {
    
    
    lazy var visitorView: HCVisitor = HCVisitor()
    var userLogin: Bool = HCUserAccountViewModel.sharedUserAccountViewModel.userLogin
    
    override func loadView() {
        if userLogin {
            super.loadView()
           // HCHomeViewModel().loadHomeModel()
                
        } else {
            
            visitorView.delegate = self
            view = visitorView
        }
    }
    
    func userWillLogin() {
        //用户将要注册
        let OAuthViewController = HCOAuthViewController()
        
        let nav = UINavigationController(rootViewController: OAuthViewController)
        
        //模态方式进入
        navigationController?.present(nav, animated: true, completion: nil)
    }
    
    func userWillRegister() {
        //用户将要登录
        print("注册")
        print("😄😄😄😄😄😄😄😄😄😄😄😄😄😄😄")

    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    // MARK: - Table view data source

    override func numberOfSections(in tableView: UITableView) -> Int {
        // #warning Incomplete implementation, return the number of sections
        return 0
    }

    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        // #warning Incomplete implementation, return the number of rows
        return 0
    }

    
    

}
